<!--Generate by Kevin's CodeBuilder -->
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
		<meta charset="UTF-8">
		<title>bui-ssm快速开发框架</title>
		<head th:include="source::header"></head>
</head>
<body>
	<div class="form_main_wrap">
		<div class="form_condition" style="padding-top:30px" >
				<table class="form_table">
					<tr>
						<td class="label label100">[(${Lang.common_selectFile})]</td>
						<td >
							<div id="fileUpload3"></div>
						</td>
					</tr>
					<tr>
						<td colspan="2" style="padding-left:150px;padding-top:30px;">
							<button class="k_icon_fff" id="submit_btn">
								<i class="fa fa-arrow-circle-up"></i>
								[(${Lang.common_btn_uploadData})]
							</button>
						</td>
					</tr>
				</table>	
				<p id="message" style="text-align:center;line-height:22px"></p>	
		</div>
	</div>
	<script type="text/javascript"  th:inline="javascript">
			$(function(){				
		          var upload3 = new $B.MutilUpload({
		                target: $("#fileUpload3"),
		                files: [{
		                    name: 'funcfile',
		                    type: '.xls',
		                    label: '请选择文件',
		                    must: '请选择.xls、.xlsx后缀的文件!'
		                }],
		                timeout: 160, //60秒钟超时             
		                immediate: false, //选择文件后是否立即自动上传，即不用用户点击提交按钮就上传
		                url: $B.getHttpHost(ctxPath) + "func/importXls",
		                success: function (res) { //成功时候的回调
		                	$("#message").html(res.message);
		                	parent.curdObj.reload();
		                	setTimeout(function(){
		                		parent.$win.close();
		                	},2000);
		                },
		                error: function (res) { //错误回调
		                    console.log("fileUpload3 error：" + res);
		                    $("#message").html(res.message);
		                },
		                setParams: function (fileName) { //设置参数
		                    return {
		                    	dataStartRow:2,
		                    	sheetName: "功能列表"
		                    };
		                }
		            });
		          $("#submit_btn").click(function(){
		        	  upload3.submit();
		          });

			});
	
	</script>
</body>
</html>